print(1+2+3)

#重复计算 for
names = ['王楠','王曼','王岳岳']
name = '王楠'
print(name)
for name in names: #for x in ...循环就是把每个元素代入变量x，然后执行缩进块的语句。
    print(name)
print(name)

#计算1-10的和
sum = 0
print(sum)
for x in [1,2,3,4,5,6,7,8,9,10]:
    sum = sum + x
    print(sum)
print(sum)

#range()函数 list() 函数
a = range(5)
s1 = list(a)
print(a)
print(s1)

sum = 0 
for x in range(101):
    sum = sum + x
print(sum)